<!doctype html>
<html>
{include file="head.html"}

<body>
<div class="fullscreen">
        <div class="scroll_content">
            <div class="topfixed">
                <div class="t_left"><a href="/index.php?m=user"><i class="back"></i></a></div>
                <div class="t_main">我的寝室</div>

            </div>
            <div class="paddingheight"></div>
            {if $sushe}
            <div class="comblock">
                <div class="my_bedroom_tianjia">
                    <p class="clearfix"><span class="fl">寝室名：{$sushe.title}</span><span class="fr"><a href="/index.php?m=sushe&a=add&id={$sushe.id}" ><i class="ico edit"></i>修改 </a> </span></p>

                    <p class="clearfix"><span class="fl">你当前共有{$sscy|count}位室友</span><span class="fr"><a href="/index.php?m=sushe&a=invite" ><i class="ico add"></i> 添加</a></span></p>
                </div>
            </div>
            <ul class="cart_new_list clearfix">
                <li>
					{foreach item=c from=$sscy}
                    <div class="list clearfix">
                        <div class="cart_pic">
                            <a href="javascript:;"><img src="{$c.user_head|images_site}.100x100.jpg" class="img radius"></a>
                        </div>
                        <div class="cart_content">
                            <div class="tit clearfix"><span class="fr">积分<b class="red">{$c.grade}分</b> </span>{$c.nickname}</div>
                            <div class="info">
                                <p class="fl">
                                   记账 <span class="red">{$c.jz_num|intval}件</span> &nbsp; 共计<span class="red">￥{$c.jz_money|intval}</span>
                                </p>

                                <p class="fr">
                                	{if $c.userid eq $ssuser.userid}
                                    <a href="/index.php?m=sushe&a=deluser" class="btn b_red">退出</a>
                                    {/if}
                                </p>
                            </div>

                        </div>
                    </div>
                    {/foreach}
                     
                </li>

            </ul>
            {else}
                {if $invitelist}
                <style>
                	.ap{color:#FF4600; text-decoration:none; font-size:0.9em;}
					.af{color:#666; text-decoration:none; font-size:0.9em;}
                </style>
                 <div class="comblock">
                    {foreach item=c from=$invitelist}
                    <div class="item">
                        <div>{$c[fuser].nickname} 邀请你加入寝室 {$c[sushe][title]}  <span class="right">{$c.dateline|date:Y-m-d}</span> </div>
                       <div> <a href="/index.php?m=sushe&a=invite_pass&id={$c.id}" class="af">确认加入</a> <span class="right"><a href="/index.php?m=sushe&a=invite_forbid&id={$c.id}" class="ap">拒绝加入</a> </span> 
                       </div>
                    </div>
                    {/foreach}
                    </div>
                  {/if}
                    <div class="comblock">
                   	 <div class="item">
                    	<a class="global_btn" href="/index.php?m=sushe&a=add">创建寝室</a>
                     </div>   
                        </div>
                
            {/if}


        </div>
    </div>
</body>
</html>
